home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Info 1994 March
/
Internet Info CD-ROM (Walnut Creek) (March 1994).iso
/
networking
/
ip
/
ka9q
/
alpha.arc
/
REGS.H
< prev
next >
Wrap
C/C++ Source or Header
|
1988-07-11
|
904b
|
38 lines
union reg {
struct half {
char low;
char high;
} byte;
unsigned short word;
};
struct regs {
union reg ax,bx,cx,dx,si,di,ds,es;
};
/* Macros to simulate Turbo-C style register pseudovariables */
#define _AX regs.ax.word
#define _AL regs.ax.byte.low
#define _AH regs.ax.byte.high
#define _BX regs.bx.word
#define _BL regs.bx.byte.low
#define _BH regs.bx.byte.high
#define _CX regs.cx.word
#define _CL regs.cx.byte.low
#define _CH regs.cx.byte.high
#define _DX regs.dx.word
#define _DL regs.dx.byte.low
#define _DH regs.dx.byte.high
#define _DI regs.di.word
#define _SI regs.si.word
#define _DS regs.ds.word
#define _ES regs.es.word
/* Segment number of pointer */
#define FP_SEG(x) (sizeof(x) == 4 ? ((long)(x) >> 16) : getds())
/* Offset of pointer */
#define FP_OFF(x) ((unsigned short)((long)(x) & 0xffff))
#define FLAG_CARRY (1 << 0) /* Carry flag */